//
//  ZhuCeViewController.m
//  Protect -A
//
//  Created by 付剑英 on 16/6/27.
//  Copyright © 2016年 付剑英. All rights reserved.
//

#import "ZhuCeViewController.h"
#import "BaseTextField.h"
#import "BaseButton.h"
#import "LogInViewController.h"
@interface ZhuCeViewController ()
@property (nonatomic,retain)BaseTextField *name;//用户名
@property (nonatomic,retain)BaseTextField *mima;//密码
@property (nonatomic,retain)BaseTextField *mima1;//再次输入
@property (nonatomic,retain)BaseButton *zhuce;//注册
@end

@implementation ZhuCeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self create];
    // Do any additional setup after loading the view.
}
#pragma mark - ------------ 创建控件 ---------------

-(void)create {

    self.name = [[BaseTextField alloc]initWithFrame:CGRectMake(90,170, 200, 50)];
    self.name.placeholder =@"请输入用户名";
    self.name.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview: self.name];
    
    self.mima = [[BaseTextField alloc]initWithFrame:CGRectMake(90,230, 200, 50)];
    self.mima.placeholder =@"请输入密码";
    self.mima.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview: self.mima];
    
    self.mima1 = [[BaseTextField alloc]initWithFrame:CGRectMake(90,290, 200, 50)];
    self.mima1.placeholder =@"请再次输入密码";
    self.mima1.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview: self.mima1];
    
    self.zhuce = [[BaseButton alloc]initWithFrame:CGRectMake(150,370, 100, 50)];
    self.zhuce.backgroundColor = [UIColor lightGrayColor];
    [self.zhuce setTitle:@"注册" forState:UIControlStateNormal];
    [self.zhuce addTarget:self action:@selector(handleZhuCe:) forControlEvents:UIControlEventTouchDown];
    [self.view addSubview: self.zhuce];
    
}
#pragma mark - ------------ 返回登录界面 ---------------

-(void)handleZhuCe:(BaseButton *)button{

    LogInViewController *vc = [[LogInViewController alloc]init];
    
    [self.navigationController pushViewController:vc animated:YES];

}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
